function getGanttData(tipoMaquina) {
	jQuery("#gantt").gantt(
			{ source : "http://localhost:8080/mapsa-web/rest/maquinas/maquinas-asign?tipoMaquina=" + 1, scale : "hours", minScale : "hours", maxScale : "days", itemsPerPage : 5,
				months : [ "Ene", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Ago", "Sep", "Oct", "Nov", "Dic" ], dow : [ "D", "L", "Ma", "Mi", "J", "V", "S" ] });
}

function handleTransfer() {
	alert("notecerrasnada");
	return false;
}
function handleRowSelectedComplete(xhr, status, args) {
	var isValid = args.isValid;
	if (!isValid) {
		leaveUser.show();
	}
}

function removeMultipleUpload() {
	upload.buttonBar.find('input[type=file]').change(function() {
		if (this.value) {
			var files = upload.uploadContent.find('.files tr');

			if (files.length > 1) {
				files.get(0).remove();
			}
		}
	});
}
function handleComplete(xhr, status, args) {
	var isValid = args.isValid;
	if (isValid) {
		editPanel.close();
	} else {
		leaveUser.show();
	}
}

function handleUserEditSaveComplete(xhr, status, args) {
	var validationFaild = args.validationFailed;
	if (!validationFaild) {
		editPanel.close();
	}
}

function handleAddItemDialogClose(xhr, status, args) {
	var validationFaild = args.validationFailed;
	var isValid = args.isValid;
	if (!validationFaild) {
		if (isValid) {
			addNewItem.hide();
		} else if (isValid === undefined) {
			addNewItem.hide();
		}
	}
}
function handleSaveEditionBeforeClose(xhr, status, args) {
	var validationFaild = args.validationFailed;
	if (!validationFaild) {
		try {
			leaveUser.hide();
		} catch (err) {
			// IGNORE
		}
		editPanel.close();
	} else {
		try {
			leaveUser.hide();
		} catch (err) {
			alert(err);
		}
	}
}